package com.zretc.service.impl;

import com.zretc.dao.CreditRatingMapper;
import com.zretc.pojo.CreditRating;
import com.zretc.service.ICreditRatingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 查询用户信用评级Service业务层处理
 * 
 * @author jiangqi
 * @date 2022-09-07
 */
@Service
public class CreditRatingServiceImpl implements ICreditRatingService
{
    @Autowired
    private CreditRatingMapper creditRatingMapper;

    /**
     * 根据用户身份证查询用户信用评级
     * 
     * @param id_card 身份证号信息
     * @return
     */
    @Override
    public CreditRating selectCreditRatingByCrId(Long id_card)
    {
        return creditRatingMapper.selectCreditRatingByCrId(id_card);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param creditRating 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CreditRating> selectCreditRatingList(CreditRating creditRating)
    {
        return creditRatingMapper.selectCreditRatingList(creditRating);
    }

    /**
     * 新增用户信用信息
     * 
     * @param creditRating
     * @return 结果
     */
    @Override
    public int insertCreditRating(CreditRating creditRating)
    {
        return creditRatingMapper.insertCreditRating(creditRating);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param creditRating 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCreditRating(CreditRating creditRating)
    {
        return creditRatingMapper.updateCreditRating(creditRating);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param crIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCreditRatingByCrIds(Long[] crIds)
    {
        return creditRatingMapper.deleteCreditRatingByCrIds(crIds);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param crId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCreditRatingByCrId(Long crId)
    {
        return creditRatingMapper.deleteCreditRatingByCrId(crId);
    }
}
